home *** CD-ROM | disk | FTP | other *** search
/ Sacred & Secular / Sacred and Secular.iso / pc / movies / shared.dir / 05036_Script_5036 < prev    next >
Text File  |  1996-04-03  |  703b  |  41 lines

  1. on startMovie
  2.   set the keyDownScript = "checkKeys"
  3. end 
  4.  
  5. on checkKeys
  6.   --
  7.   --
  8.   -- Check for quit, and volume keys
  9.   --
  10.   
  11.   if the machineType = 256 then
  12.     set quitKey = the controlDown and the key = "q"  
  13.   else
  14.     set quitKey = the commandDown and the key = "q"  
  15.   end if
  16.   
  17.   if quitKey then 
  18.     doQuit
  19.     exit
  20.   end if
  21.   
  22.   if the key <= "9" and the key >= "0" then
  23.     doSetVolume(charToNum(the key) - charToNum("0"))
  24.     exit
  25.   end if
  26.   
  27.   --put ">>>checkKeys" && the key
  28.   
  29. end
  30.  
  31. on doSetVolume n
  32.   global gVolume  
  33.   
  34.   set volList = [0, 7, 15, 31, 45, 63, 91, 127, 181, 255]
  35.   
  36.   set gVolume = getAt(volList, (n+1))
  37.   
  38.   setQTVol(gVolume)
  39. end 
  40.  
  41.